<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<div class="table-responsive">
    <th:block th:if="${type}==2">
        <div class="m-l-md m-r-md">
            <section class="m-t-md">
                <div class="row">
                    <section class="col-md-4 col-sm-6" th:if="!${#lists.isEmpty(dataMap['list'])}" th:each="teacher : ${dataMap['list']}">
                        <div class="panel panel-default J_V-panel">
                            <div class="panel-heading" style="height: auto;">
                                <section class="clearfix">
                                    <aside class="pull-left">
                                        <i class="fa fa-user-secret" style="color: #d5dff5;font-size: 38px;"></i>
                                    </aside>
                                    <aside class="pull-left m-l-sm">
                                        <h4>
                                            <strong class="c-000 fs14" th:text="${teacher['teacherName']}">李斯特老师</strong>
                                        </h4>
                                    </aside>
                                </section>
                            </div>
                            <div class="panel-body">
                                <section class="row text-center">
                                    <section class="col-sm-4">
                                        <div class="m-t-sm">
                                            <span class="fs12 c-999">分成总金额</span>
                                            <p class="m-t-sm">
                                                <strong class="fs20 c-000" th:if="${teacher['expand']}!=null" th:text="(${teacher['expand']['1']}!=null?${#numbers.formatDecimal(teacher['expand']['1'],0,2)}:0)+(${teacher['expand']['2']}!=null?${#numbers.formatDecimal(teacher['expand']['2'],0,2)}:0)">49266</strong>
                                                <strong class="fs20 c-000" th:if="${teacher['expand']}==null" >0</strong>
                                            </p>
                                        </div>
                                    </section>
                                    <section class="col-sm-4">
                                        <div class="m-t-sm">
                                            <span class="fs12 c-999">未提现金额</span>
                                            <p class="m-t-sm">
                                                <strong class="fs20 c-000" th:if="${teacher['expand']}!=null" th:text="${teacher['expand']['1']}!=null?${teacher['expand']['1']}:0">15698</strong>
                                                <strong class="fs20 c-000" th:if="${teacher['expand']}==null" >0</strong>
                                            </p>
                                        </div>
                                    </section>
                                    <section class="col-sm-4">
                                        <div class="m-t-sm">
                                            <span class="fs12 c-999">回复问题数</span>
                                            <p class="m-t-sm">
                                                <strong class="fs20 c-000" th:text="${teacher['questionNum']}">2569</strong>
                                            </p>
                                        </div>
                                    </section>
                                </section>
                                <section class="m-t-md text-center">
                                    <button type="button" class="btn btn-outline btn-primary btn-w-m openInfo" th:attrappend="data-id=${teacher['id']}"> 查看详细 </button>
                                </section>
                            </div>
                        </div>
                    </section>
                </div>
            </section>
        </div>
    </th:block>
    <th:block th:if="${type}==1">
   <table class="table table-bordered">
        <thead>
        <tr>
            <th class="text-center"><div class="table-first-id">ID</div></th>
            <th class="text-center" width="30%">问题内容</th>
            <th class="text-center" width="20%">订单号</th>
            <th class="text-center" width="10%">创建时间</th>
            <th class="text-center" width="10%">提问人</th>
            <th class="text-center" width="10%">收益讲师</th>
            <th class="text-center" width="10%">分成金额</th>
            <th class="text-center" width="5%">状态</th>
        </tr>
        </thead>
    </table>
    </th:block>
    <div class="J_V_tabContent table-xScrollWrap">
        <table class="table table-bordered table-hover table-xs-content">
            <tbody>
            <tr class="jqgfirstrow" role="row">
                <th class="text-center"><div class="table-first-id">&nbsp;</div></th>
                <th:block th:if="${type}==1">
                <th class="text-center" width="30%">&nbsp;</th>
                <th class="text-center" width="20%">&nbsp;</th>
                <th class="text-center" width="10%">&nbsp;</th>
                <th class="text-center" width="10%">&nbsp;</th>
                <th class="text-center" width="10%">&nbsp;</th>
                <th class="text-center" width="10%">&nbsp;</th>
                <th class="text-center" width="5%">&nbsp;</th>
                </th:block>
            </tr>
            <tr th:if="${#lists.isEmpty(dataMap['list'])}">
                <td colspan="8" class="text-center">
                    <div class="noDataTipsBox">
                        <p><span class="c-4e fs16">亲，还没有数据~~~</span></p>
                    </div>
                </td>
            </tr>
            <th:block th:if="${type}==1">
            <tr th:if="!${#lists.isEmpty(dataMap['list'])}" th:each="teacherCommission : ${dataMap['list']}">
                <td class="text-center">
                    <div class="table-first-id">
                        <input type="checkbox" th:text="${teacherCommission['id']}" class="i-checks"/>
                    </div>
                </td>
                <td class="text-center" th:text="${teacherCommission['qaQuestion']['context']}"></td>
                <td class="text-center" th:text="${teacherCommission['orderNo']}"></td>
                <td class="text-center" th:text="${#strings.substring(teacherCommission['createTime'],0,16)}"></td>
                <td class="text-center" th:text="${teacherCommission['userMap']['nickname']}"></td>
                <td class="text-center" th:text="${teacherCommission['teacherMap']['teacherName']}"></td>
                <td class="text-center" th:text="${teacherCommission['price']}"></td>
                <td class="text-center" th:if="${teacherCommission['status']} == 1"><span class="label label-danger">未提取</span></td>
                <td class="text-center" th:if="${teacherCommission['status']} == 2"><span class="label label-info">已提取</span></td>
            </tr>
            </th:block>
            </tbody>
        </table>
    </div>
    </th:block>
    <!-- 分页，开始 -->
    <div data-th-replace="layout/adminPage"></div>
    <!-- 分页，结束 -->
</div>
</html>